package com.jin.webvideo.base.dc.safe.whitelist;

import java.util.Collection;

/**
 * 白名单接口
 *
 * @author biao532
 * @date 2023/12/03 11:16
 **/
public interface Whitelist<E> {
    int size();

    default boolean isEmpty() {
        return this.size() == 0;
    }

    boolean contains(E e);

    default boolean containsAll(Collection<E> e) {
        for (E i : e) {
            if (!contains(i)) {
                return false;
            }
        }
        return true;
    }
}
